package se.mushroomwars.gameplay;

import java.awt.Point;
import java.util.ArrayList;

public class PathList {
	private ArrayList<Point> key = new ArrayList<Point>();
	private ArrayList<Path> list = new ArrayList<Path>();
	
	public Path get(Point k) {
		for (int i = 0; i < list.size(); i++) {
			if (k == key.get(i))
				return list.get(i);
		}
		return null;
	}
	
	public Path get(int i) {
		if (i < list.size())
			return list.get(i);
		else
			return null;
	}
	
	public void add(Point key, Path p) {
		this.key.add(key);
		list.add(p);
	}
	
	public int size () {
		return list.size();
	}
}
